﻿using sx_windows.data.bean;
using sx_windows.data.repository.source;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace sx_windows.common
{
    class BaseRepository
    {
        private LocalSource localSource;
        public BaseRepository()
        {
            localSource = new LocalSource();
        }
        public SxConfigBean GetSxConfig()
        {
            return localSource.GetSxConfig();
        }
        public void SaveSxConfig(string user,string password,int needSend)
        {
            localSource.SaveSxConfig(user, password,needSend);
        }
        public RouterConfigBean GetRouterConfig()
        {
            return localSource.GetRouterConfig();
        }
        public void SaveRouterConfig(string address,string user, string password)
        {
            localSource.SaveRouterConfig(address,user, password);
        }
        public WifiSettingBean GetWifiConfig()
        {
            return localSource.GetWifiConfig();
        }
        public void SaveWifiConfig(string name, string password)
        {
            localSource.SaveWifiConfig(name, password);
        }
    }
}
